<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>西瓜后台管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/car_maintain.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/files.css" media="all">
</head>
<body>
<div class="layui-fluid">
    <div class="layui-card">
        <div class="layui-header">新增品牌</div>
        <div class="layui-card-body">
            <form class="layui-form">
                <div class="layui-form-item">
                    <label class="layui-form-label">品牌<span class="layui-text-red">*</span> </label>
                    <div class="layui-input-inline">
                        <input type="text" name="brand" class="layui-input" placeholder="请输入品牌">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">厂商<span class="layui-text-red">*</span> </label>
                    <div class="layui-input-inline">
                        <input type="text" name="trade" class="layui-input" placeholder="请输入品牌">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">车系<span class="layui-text-red">*</span> </label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" placeholder="请输入品牌">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">指导价<span class="layui-text-red">*</span> </label>
                    <div class="layui-input-inline">
                        <input type="text" class="layui-input" placeholder="请输入品牌">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">品牌LOGO<span class="layui-text-red">*</span> </label>
                    <div class="layui-input-block">
                        <div id="uploadImg_fm_wrap">
                            <i class="layui-icon layui-icon-add-1"></i>点击上传
                            <button type="button" class="" id="file_fm"></button>
                            <div id="uploadImg_fm" class="uploadImg_result"></div>
                        </div>
                    </div>
                </div>
            </form>
            <div class="layui-layer-btn my_skin">
                <a class="layui-layer-btn0" id="fileListAction">保存</a>
                <a class="layui-layer-btn2">取消</a>
            </div>
        </div>
    </div>
</div>
<script src="../../../layuiadmin/layui/layui.js"></script>
<script>
    layui.config({
        base: '../../../layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
        list: 'car_maintain/list', //list模块
    }).use(['index','list','form','layer','upload'],function () {
        var layer = layui.layer
            ,$ = layui.jquery
            ,upload = layui.upload;
        var uploadImg_all= $("#uploadImg_all");
        var file_all = upload.render({
            elem: '#file_fm'
            ,url: '/upload/'
            ,auto: false //选择文件后不自动上传
            ,bindAction: '#fileListAction' //指向一个按钮触发上传
            ,choose: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $("#uploadImg_fm").html('<img id="fm_resultImg" src="'+result+'"/>');
                });
            }
            ,done: function(res){
                //如果上传失败
                if(res.code > 0){
                    return layer.msg('上传失败');
                }
                //上传成功
            }
        });

        $("#dispositionMore").on('click',function () {
            layer.open({
                type: 2
                ,title:'车辆配置'
                ,area: ['550px', '260px']
                ,maxmin: true
                ,content:'vehicle-disposition.html'
                ,btn:['确定','取消']
                ,success: function(layero, index) {
                    layer.iframeAuto(index);
                }
            });
        });

        $("#previewEdit_cxld").on("click",function () {
            layer.open({
                type: 2
                ,title:'车型亮点'
                ,area: ['550px', '260px']
                ,maxmin: true
                ,content:'preview.html'
                ,btn:['确定','取消']
                ,success: function(layero, index) {
                    layer.iframeAuto(index);
                }
            });
        })

        $("#addPlan").click(function () {
            $(".financialPlan2,#delPlan").removeClass("layui-hide");
            $(this).addClass("layui-hide");
        })
        $("#delPlan").click(function () {
            $("#addPlan").removeClass("layui-hide");
            $(this).addClass("layui-hide");
            $('.financialPlan2').addClass("layui-hide");
        })

    });
</script>
</body>
</html>